package com.bidevalution.dao.mapper;

import com.bidevalution.dao.entity.BeEvalutionC1IsNullVo;
import com.bidevalution.dao.entity.BeEvalutionOutcome;
import com.bidevalution.dao.entity.VoteParams;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface BeEvalutionOutcomeMapper {
    int deleteByPrimaryKey(String seqId);

    int insert(BeEvalutionOutcome record);

    int insertSelective(BeEvalutionOutcome record);

    BeEvalutionOutcome selectByPrimaryKey(String seqId);

    int updateByPrimaryKeySelective(BeEvalutionOutcome record);

    int updateByPrimaryKey(BeEvalutionOutcome record);

    int selectCount(@Param("sectionStepId") String sectionStepId, @Param("expertId") String expertId, @Param("layoutCode") String layoutCode);

    List<BeEvalutionOutcome> selectListByStepId(@Param("sectionStepId") String sectionStepId);

    void deleteBySectionId(String sectionId);

    /**
     * 软删除专家评审数据
     * @param record
     * @return
     */
    int updateStatusByCode(BeEvalutionOutcome record);
    int updateStatusByCodeAlt(BeEvalutionOutcome record);



    List<BeEvalutionOutcome> findBeEvalutionOutcomes(BeEvalutionOutcome beEvalutionOutcome);

    List<BeEvalutionC1IsNullVo> reviewdetailsByJiShu(BeEvalutionOutcome beEvalutionOutcome);
    List<BeEvalutionC1IsNullVo> reviewdetailsByZiXin(BeEvalutionOutcome beEvalutionOutcome);

    /**
     * 重评时复制专家上一次评审的内容
     *
     * @param sectionId
     * @param sectionStepId
     * @return
     */
    int updateSyncResult(@Param("sectionId") String sectionId, @Param("sectionStepId") String sectionStepId,@Param("expertId") String expertId);

    /**
     * 重评时复制专家上一次评审的内容
     *
     * @param sectionId
     * @param sectionStepId
     * @return
     */
    int insertSyncResult(@Param("sectionId") String sectionId, @Param("sectionStepId") String sectionStepId, @Param("expertId") String expertId);

    List<BeEvalutionOutcome> findBeEvalutionOutcomeByEnterprise(@Param("sectionId") String sectionId, @Param("sectionStepId") String sectionStepId);

    List<Map<String,Object>> getCreditSubScoreGroupList(@Param("sectionId") String sectionId, @Param("sectionStepId") String sectionStepId, @Param("layoutCode") String layoutCode);

    List<Map<String,Object>>  getCreditSubScoreAllList(@Param("sectionId") String sectionId, @Param("sectionStepId") String sectionStepId, @Param("layoutCode") String layoutCode);

    List<Map<String,Object>> getCreditMainScoreGroupList(@Param("sectionId") String sectionId, @Param("sectionStepId") String sectionStepId, @Param("layoutCode") String layoutCode);

    List<Map<String,Object>>  getCreditMainScoreAllList(@Param("sectionId") String sectionId, @Param("sectionStepId") String sectionStepId, @Param("layoutCode") String layoutCode);

    void updateResult(VoteParams voteParams);

    void callProcedure(@Param("procedureName")String procedureName,@Param("sectionId") String sectionId, @Param("sectionStepId")String sectionStepId,@Param("submitCode") String submitCode,@Param("layoutCode") String layoutCode,@Param("expertId") String expertId);

    void updateChildrenResult(VoteParams voteParams);
}
